.class public Lcom/estrongs/android/pop/app/transferstation/c;
.super Ljava/lang/Object;
.source "FileTransferStationPresenter.java"

# interfaces
.implements Lcom/estrongs/android/pop/app/transferstation/a;


# instance fields
.field private a:Lcom/estrongs/android/pop/app/transferstation/b;

.field private b:Lcom/estrongs/fs/g;

.field private c:Landroid/content/Intent;

.field private d:Landroid/net/Uri;

.field public e:Lcom/estrongs/android/widget/c;


# direct methods
.method public constructor <init>(Lcom/estrongs/android/pop/app/transferstation/b;Landroid/content/Intent;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    iput-object p1, p0, Lcom/estrongs/android/pop/app/transferstation/c;->a:Lcom/estrongs/android/pop/app/transferstation/b;

    .line 3
    iput-object p2, p0, Lcom/estrongs/android/pop/app/transferstation/c;->c:Landroid/content/Intent;

    .line 4
    invoke-interface {p1, p0}, Les/ue;->a(Ljava/lang/Object;)V

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/pop/app/transferstation/c;)Lcom/estrongs/fs/g;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/pop/app/transferstation/c;->b:Lcom/estrongs/fs/g;

    return-object p0
.end method

.method private a(Landroid/app/Activity;ILjava/lang/String;Landroid/content/DialogInterface$OnClickListener;ILjava/lang/String;)V
    .locals 2

    .line 5
    new-instance p2, Lcom/estrongs/android/pop/app/transferstation/c$b;

    invoke-direct {p2, p0}, Lcom/estrongs/android/pop/app/transferstation/c$b;-><init>(Lcom/estrongs/android/pop/app/transferstation/c;)V

    .line 6
    new-instance v0, Lcom/estrongs/android/widget/c;

    invoke-direct {v0, p1, p6, p2, p5}, Lcom/estrongs/android/widget/c;-><init>(Landroid/content/Context;Ljava/lang/String;Lcom/estrongs/fs/h;I)V

    iput-object v0, p0, Lcom/estrongs/android/pop/app/transferstation/c;->e:Lcom/estrongs/android/widget/c;

    const/4 p2, 0x0

    .line 7
    invoke-virtual {v0, p2}, Lcom/estrongs/android/widget/c;->a(Z)V

    .line 8
    iget-object p2, p0, Lcom/estrongs/android/pop/app/transferstation/c;->e:Lcom/estrongs/android/widget/c;

    const v0, 0x7f110299

    invoke-virtual {p1, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {p2, v0, v1}, Lcom/estrongs/android/widget/c;->a(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    .line 9
    invoke-static {}, Lcom/estrongs/android/pop/l;->L1()Lcom/estrongs/android/pop/l;

    move-result-object p2

    .line 10
    invoke-virtual {p2}, Lcom/estrongs/android/pop/l;->k1()Z

    move-result p2

    const/4 v0, 0x1

    if-eqz p2, :cond_0

    .line 11
    invoke-static {}, Lcom/estrongs/android/pop/l;->L1()Lcom/estrongs/android/pop/l;

    move-result-object p2

    .line 12
    invoke-virtual {p2}, Lcom/estrongs/android/pop/l;->k1()Z

    .line 13
    iget-object p2, p0, Lcom/estrongs/android/pop/app/transferstation/c;->e:Lcom/estrongs/android/widget/c;

    invoke-virtual {p2, v0}, Lcom/estrongs/android/widget/c;->b(Z)V

    .line 14
    iget-object p2, p0, Lcom/estrongs/android/pop/app/transferstation/c;->e:Lcom/estrongs/android/widget/c;

    invoke-virtual {p2, p6}, Lcom/estrongs/android/widget/c;->a(Ljava/lang/String;)V

    goto :goto_0

    .line 15
    :cond_0
    iget-object p2, p0, Lcom/estrongs/android/pop/app/transferstation/c;->e:Lcom/estrongs/android/widget/c;

    invoke-virtual {p2, v0}, Lcom/estrongs/android/widget/c;->b(Z)V

    .line 16
    :goto_0
    iget-object p2, p0, Lcom/estrongs/android/pop/app/transferstation/c;->e:Lcom/estrongs/android/widget/c;

    invoke-virtual {p2, p5}, Lcom/estrongs/android/widget/c;->a(I)V

    .line 17
    iget-object p2, p0, Lcom/estrongs/android/pop/app/transferstation/c;->e:Lcom/estrongs/android/widget/c;

    invoke-virtual {p2, p3}, Lcom/estrongs/android/widget/c;->a(Ljava/lang/CharSequence;)V

    .line 18
    iget-object p2, p0, Lcom/estrongs/android/pop/app/transferstation/c;->e:Lcom/estrongs/android/widget/c;

    const p3, 0x7f11029e

    invoke-virtual {p1, p3}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p2, p1, p4}, Lcom/estrongs/android/widget/c;->b(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    .line 19
    iget-object p1, p0, Lcom/estrongs/android/pop/app/transferstation/c;->e:Lcom/estrongs/android/widget/c;

    invoke-virtual {p1}, Lcom/estrongs/android/widget/c;->n()V

    return-void
.end method


# virtual methods
.method public a()Ljava/lang/String;
    .locals 1

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/pop/app/transferstation/c;->b:Lcom/estrongs/fs/g;

    if-nez v0, :cond_1

    .line 3
    iget-object v0, p0, Lcom/estrongs/android/pop/app/transferstation/c;->d:Landroid/net/Uri;

    if-nez v0, :cond_0

    const-string v0, "unknown"

    goto :goto_0

    :cond_0
    invoke-virtual {v0}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v0

    :goto_0
    return-object v0

    .line 4
    :cond_1
    invoke-interface {v0}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/estrongs/android/util/h0;->x(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public a(Landroid/app/Activity;)V
    .locals 2

    .line 20
    new-instance v0, Lcom/estrongs/android/ui/dialog/s0;

    iget-object v1, p0, Lcom/estrongs/android/pop/app/transferstation/c;->b:Lcom/estrongs/fs/g;

    invoke-direct {v0, p1, v1}, Lcom/estrongs/android/ui/dialog/s0;-><init>(Landroid/app/Activity;Lcom/estrongs/fs/g;)V

    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/s0;->a()V

    return-void
.end method

.method public b(Landroid/app/Activity;)V
    .locals 8

    .line 1
    sget-boolean v0, Lcom/estrongs/android/pop/j;->n:Z

    if-eqz v0, :cond_0

    const/4 v0, -0x2

    const/4 v6, -0x2

    goto :goto_0

    :cond_0
    const/4 v0, -0x1

    const/4 v6, -0x1

    .line 2
    :goto_0
    invoke-static {}, Lcom/estrongs/android/pop/c;->b()Ljava/lang/String;

    move-result-object v7

    .line 3
    new-instance v5, Lcom/estrongs/android/pop/app/transferstation/c$a;

    invoke-direct {v5, p0, p1}, Lcom/estrongs/android/pop/app/transferstation/c$a;-><init>(Lcom/estrongs/android/pop/app/transferstation/c;Landroid/app/Activity;)V

    const v3, 0x7f080741

    const v0, 0x7f11003a

    .line 4
    invoke-virtual {p1, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v4

    move-object v1, p0

    move-object v2, p1

    .line 5
    invoke-direct/range {v1 .. v7}, Lcom/estrongs/android/pop/app/transferstation/c;->a(Landroid/app/Activity;ILjava/lang/String;Landroid/content/DialogInterface$OnClickListener;ILjava/lang/String;)V

    return-void
.end method

.method public c(Landroid/app/Activity;)V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/transferstation/c;->b:Lcom/estrongs/fs/g;

    invoke-interface {v0}, Lcom/estrongs/fs/g;->getPath()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/estrongs/android/pop/app/transferstation/c;->b:Lcom/estrongs/fs/g;

    invoke-interface {v1}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v1

    invoke-static {p1, v0, v1}, Lcom/estrongs/android/pop/view/utils/b;->d(Landroid/app/Activity;Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public d(Landroid/app/Activity;)V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/transferstation/c;->b:Lcom/estrongs/fs/g;

    .line 2
    invoke-interface {v0}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v0

    .line 3
    invoke-static {p1, v0}, Lcom/estrongs/android/pop/utils/p;->a(Landroid/app/Activity;Ljava/lang/String;)V

    return-void
.end method

.method public start()V
    .locals 6

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/transferstation/c;->c:Landroid/content/Intent;

    if-nez v0, :cond_0

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/pop/app/transferstation/c;->a:Lcom/estrongs/android/pop/app/transferstation/b;

    invoke-interface {v0}, Lcom/estrongs/android/pop/app/transferstation/b;->e()V

    goto/16 :goto_1

    .line 3
    :cond_0
    :try_start_0
    invoke-virtual {v0}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/pop/app/transferstation/c;->d:Landroid/net/Uri;

    if-nez v0, :cond_1

    .line 4
    iget-object v0, p0, Lcom/estrongs/android/pop/app/transferstation/c;->a:Lcom/estrongs/android/pop/app/transferstation/b;

    invoke-interface {v0}, Lcom/estrongs/android/pop/app/transferstation/b;->e()V

    return-void

    .line 5
    :cond_1
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/Application;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    .line 6
    iget-object v1, p0, Lcom/estrongs/android/pop/app/transferstation/c;->d:Landroid/net/Uri;

    invoke-static {v0, v1}, Lcom/estrongs/android/util/h0;->a(Landroid/content/Context;Landroid/net/Uri;)Ljava/lang/String;

    move-result-object v0

    if-nez v0, :cond_2

    .line 7
    iget-object v0, p0, Lcom/estrongs/android/pop/app/transferstation/c;->d:Landroid/net/Uri;

    invoke-static {v0}, Lcom/estrongs/android/util/h0;->b(Landroid/net/Uri;)Ljava/lang/String;

    move-result-object v0

    .line 8
    :cond_2
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    const/4 v2, 0x1

    if-eqz v1, :cond_3

    .line 9
    iget-object v1, p0, Lcom/estrongs/android/pop/app/transferstation/c;->d:Landroid/net/Uri;

    invoke-virtual {v1}, Landroid/net/Uri;->getPath()Ljava/lang/String;

    move-result-object v1

    .line 10
    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_3

    const-string v3, "/"

    .line 11
    invoke-virtual {v1, v3, v2}, Ljava/lang/String;->indexOf(Ljava/lang/String;I)I

    move-result v3

    const/4 v4, -0x1

    if-le v3, v4, :cond_3

    .line 12
    invoke-static {}, Lcom/estrongs/android/pop/c;->b()Ljava/lang/String;

    move-result-object v0

    .line 13
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v3}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 14
    :cond_3
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_4

    .line 15
    iget-object v0, p0, Lcom/estrongs/android/pop/app/transferstation/c;->a:Lcom/estrongs/android/pop/app/transferstation/b;

    invoke-interface {v0}, Lcom/estrongs/android/pop/app/transferstation/b;->e()V

    return-void

    .line 16
    :cond_4
    invoke-static {v0}, Landroid/net/Uri;->encode(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/net/Uri;->decode(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 17
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/estrongs/fs/f;->g(Ljava/lang/String;)Lcom/estrongs/fs/g;

    move-result-object v1

    iput-object v1, p0, Lcom/estrongs/android/pop/app/transferstation/c;->b:Lcom/estrongs/fs/g;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    if-eqz v1, :cond_5

    .line 18
    :try_start_1
    invoke-interface {v1}, Lcom/estrongs/fs/g;->g()Z

    move-result v1

    if-nez v1, :cond_6

    .line 19
    :cond_5
    iget-object v1, p0, Lcom/estrongs/android/pop/app/transferstation/c;->a:Lcom/estrongs/android/pop/app/transferstation/b;

    invoke-interface {v1}, Lcom/estrongs/android/pop/app/transferstation/b;->e()V
    :try_end_1
    .catch Lcom/estrongs/fs/FileSystemException; {:try_start_1 .. :try_end_1} :catch_0
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    return-void

    :catch_0
    move-exception v1

    .line 20
    :try_start_2
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    .line 21
    :cond_6
    iget-object v1, p0, Lcom/estrongs/android/pop/app/transferstation/c;->b:Lcom/estrongs/fs/g;

    invoke-interface {v1}, Lcom/estrongs/fs/g;->length()J

    move-result-wide v3

    invoke-static {v3, v4}, Lcom/estrongs/fs/util/f;->g(J)Ljava/lang/String;

    move-result-object v1

    .line 22
    iget-object v3, p0, Lcom/estrongs/android/pop/app/transferstation/c;->a:Lcom/estrongs/android/pop/app/transferstation/b;

    iget-object v4, p0, Lcom/estrongs/android/pop/app/transferstation/c;->b:Lcom/estrongs/fs/g;

    iget-object v5, p0, Lcom/estrongs/android/pop/app/transferstation/c;->b:Lcom/estrongs/fs/g;

    invoke-interface {v5}, Lcom/estrongs/fs/g;->getName()Ljava/lang/String;

    move-result-object v5

    invoke-interface {v3, v4, v5, v1}, Lcom/estrongs/android/pop/app/transferstation/b;->a(Lcom/estrongs/fs/g;Ljava/lang/String;Ljava/lang/String;)V

    .line 23
    iget-object v1, p0, Lcom/estrongs/android/pop/app/transferstation/c;->a:Lcom/estrongs/android/pop/app/transferstation/b;

    invoke-static {v0}, Lcom/estrongs/android/util/n0;->b(Ljava/lang/String;)I

    move-result v0

    const v3, 0x93001

    if-ne v0, v3, :cond_7

    goto :goto_0

    :cond_7
    const/4 v2, 0x0

    :goto_0
    invoke-interface {v1, v2}, Lcom/estrongs/android/pop/app/transferstation/b;->c(Z)V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1

    goto :goto_1

    .line 24
    :catch_1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/transferstation/c;->a:Lcom/estrongs/android/pop/app/transferstation/b;

    invoke-interface {v0}, Lcom/estrongs/android/pop/app/transferstation/b;->e()V

    :goto_1
    return-void
.end method
